#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>


int main(int argc, char* argv[])
{


  struct in_addr addr;
  uint16_t port = 0x1234;
  uint16_t net_port;
  char* str_addr;
  inet_aton(argv[1], &addr);
  printf("net_addr = %x \n", addr.s_addr);
  str_addr = inet_ntoa(addr);
  printf("str_addr = %s \n", str_addr);
  net_port = htons(port);
  printf("net_port = %x \n", net_port);
  return 0;

}
